app.service('brandService',function ($http) {
    this.brandInfo=function (pageNum,pageSize) {
        return  $http.get('../brand/findAll.gali?pageNum='+pageNum+'&pageSize='+pageSize);
    }

    //保存
    this.add=function (editBrand) {
        return 	$http.post('../brand/addBrand.gali',editBrand);
    }
    //修改
    this.editInfo=function (editBrand) {
        return   $http.put('../brand/updateBrand.gali',editBrand);
    }
    //删除
    this.deleteBrand=function (ids) {
        //获取选中的复选框
        return	$http.post('../brand/deleteBrand.gali?ids='+ids)
    }
    //条件查询
    this.search=function (pageNum,pageSize,entity) {
        return  $http.post('../brand/selectKeyWord.gali?pageNum='+pageNum +'&pageSize='+pageSize,entity)
    }

    this.selectOptionList=function () {
        return $http.get('../brand/selectOptionList.gali');
    }
});